function hashCode() {
  if (!(是字串(this) || this?.[Symbol.iterator])) throw `用法：${hashCode.name}.call('字串')`
  let hash = 0, i, chr
  if (!this.length) return hash
  for (i = 0; i < this.length; ++i) {
    chr = this.codePointAt(i)
    hash = ((hash << 5) - hash) + chr
    hash |= 0
  }
  return hash.toString(16).toUpperCase()
}

function cssPath(el) {
  let act = el.nodeName
  el.classList.forEach(cl => act += '.' + cl)
  if (el.id) act += '#' + el.id
  if (!el.id && el.parentElement) {
    let res = cssPath(el.parentElement)
    res.push(act)
    return res
  } else {
    return [act]
  }
}

function throttle(callback, limit) {
  let waiting = false
  return function () {
    if (!waiting) {
      callback.apply(this, arguments)
      waiting = true
      setTimeout(function () {
        waiting = false
      }, limit)
    }
  }
}